home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtable.dxr / 00006_span corner subtable.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  812 b   |  33 lines

  1. property ancestor
  2.  
  3. on new me, tableName, castName, tableChannel, xLoc, vSlider, HSlider, descendant
  4.   if objectp(descendant) then
  5.     PassVar = descendant
  6.   else
  7.     PassVar = me
  8.   end if
  9.   ancestor = new(script("subtable object"), tableName, castName, tableChannel, xLoc, vSlider, HSlider, PassVar)
  10.   return me
  11. end
  12.  
  13. on CalcCenterofRect me, xRect
  14.   if the machineType = 256 then
  15.     l = getAt(xRect, 1)
  16.     t = getAt(xRect, 2)
  17.     R = getAt(xRect, 3)
  18.     b = getAt(xRect, 4)
  19.     xCenter = (R - l) / 2
  20.     if ((l mod 2) = 1) and ((R mod 2) = 1) then
  21.       xCenter = xCenter - 1
  22.     end if
  23.     yCenter = (b - t) / 2
  24.     if ((t mod 2) = 0) and ((b mod 2) = 0) then
  25.       yCenter = yCenter - 1
  26.     end if
  27.     xPoint = point(l + xCenter, t + yCenter)
  28.   else
  29.     xPoint = RectToLoc(xRect)
  30.   end if
  31.   return xPoint
  32. end
  33.